local app = require "app"
local package = "club.threecard.doudizhu"
local gamelib = require 'club.threecard.gamelib'
local pokerlib = require 'club.threecard.pokerlib'

local game = gamelib.game.new({
    package = package,
    gamelib = gamelib,
    pokerlib = pokerlib,

    on_start = function(self)
        local entrances = require 'club.threecard.doudizhu.overried_entrance.entrances'
        self.game_scene.overried_entrance(entrances)
        self.kbe.register('DoudizhuPlayer')
        self.kbe.register('DoudizhuRoom')
        self.kbe.register("Seat")
        self.ui.init_routes()
    end,

    on_started = function(self)
        self.audio.post('doudizhu:bgm')
        if self.reconnection.fast_resume() then
            return
        end
        self.router.go('/club.threecard.doudizhu/entrance')
    end
})

return game